IEnumSTATPROPSTG-Compound File Implementation

The compound file implementation of the IEnumSTATPROPSTG interface is used to enumerate through properties, resulting in STATPROPSTG1K7QPRP structures, which contain statistical information about the properties managed by the compound file implementation of IPropertyStorage, which is associated with a current compound file storage object.

The constructor in the OLE implementation of IEnumSTATPROPSTG creates a class that reads the entire property set, and creates a static array which can be shared when IEnumSTATPROPSTG::Clone is called.

When to Use

Call the compound file implementation of IEnumSTATPROPSTG to enumerate the STATPROPSTG structures that contain information about the properties within the current property set. When you are using the compound file implementation of the property storage interfaces, call IPropertyStorage::Enum to return a pointer to IEnumSTATPROPSTG to manage the property storage object and the elements within it.

Remarks

IEnumSTATPROPSTG::Next

Gets the next one or more STATPROPSTG structures (the number is specified by the celt parameter). Returns S_OK if successful.

IEnumSTATPROPSTG::Skip

Skips the number of elements specified in celt. The next element to be enumerated through a call to Next then becomes the element after the ones skipped. Returns S_OK if celt elements were skipped; returns S_FALSE if fewer than celt elements were skipped.

IEnumSTATPROPSTG::Reset

Sets the cursor to the beginning of the enumeration. If successful, returns S_OK, otherwise, returns STG_E_INVALIDHANDLE.

IEnumSTATPROPSTG::Clone

Uses the constructor for the IEnumSTATPROPSTG to create a copy of the array. Because the class that constructs the static array actually contains the object, this function mainly adds to the reference count.

See Also

STATPROPSTG, IPropertyStorage::Enum